import java.util.ArrayList;
import java.util.List;


public class ListManager {

	// ---------------------------------------------------------------------------
	static public List<RainmanPlanet> AllPlanets(PlanetWars pw) {
		List<RainmanPlanet> r = new ArrayList<RainmanPlanet>();
		for (Planet p : pw.Planets()) {
			r.add( new RainmanPlanet(p));
		}
		return r;
	}
	
	// ---------------------------------------------------------------------------
	static public List<RainmanPlanet> MyPlanets(PlanetWars pw) {
		List<RainmanPlanet> r = new ArrayList<RainmanPlanet>();
		for (Planet p : pw.Planets()) {
			if (p.Owner() == 1) {
				r.add( new RainmanPlanet(p));
			}
		}
		return r;
	}
	//---------------------------------------------------------------------------
	static public List<RainmanPlanet> notMyPlanets(PlanetWars pw){
		List<RainmanPlanet> r = new ArrayList<RainmanPlanet>();
		for (Planet p : pw.Planets()) {
			if (p.Owner() != 1) {
				r.add(new RainmanPlanet(p));
			}
		}
		return r;		
		
	} 	
}
